import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author cxh
 * @date 2022/4/26 18:17
 */
@Getter
@AllArgsConstructor
public enum FingerEnum {

    SHITOU("3","石头"),
    JIANDAO("2","剪刀"),
    BU("1","布"),
    ;

    private String code;

    private String remark;

    public static String getFinger(String code){
        for (FingerEnum value : values()) {
            if (value.getCode().equals(code)){
                return value.getRemark();
            }
        }
        return null;
    }
}
